<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>添加角色</title>
    <link rel="icon" href="favicon.ico" type="image/ico">


    <meta name="author" content="yinqi">
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/materialdesignicons.min.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
</head>

<body data-logobg="color_8" data-sidebarbg="color_8">
<div class="layout-web">
    <div class="layout-container">
        <%--导航页面--%>
        <c:import url="nav.jsp"></c:import>

        <!--页面主要内容-->
        <main class="layout-content">

            <div class="container-fluid">

                <div class="col-md-12">
                    <div class="card">
                        <div class="card-header"><h4>基本样式</h4></div>
                        <div class="card-body">
                            <form id="form4" class="form-horizontal" action="adddept.action" method="post">
                                <div class="form-group">
                                    <label class="col-xs-12" for="deptname">部门名称</label>
                                    <div class="col-xs-12">
                                        <input class="form-control" type="text" id="deptname" name="deptname" placeholder="部门名称..">
                                        <div class="help-block">输入更多信息</div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div class="col-xs-12">
                                        <button class="btn btn-primary" type="button" onclick="myfun3()">提交</button>
                                        <button class="btn btn-info" type="reset">重置</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>

            </div>

        </main>
        <!--End 页面主要内容-->
    </div>
</div>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" src="js/adddept.js"></script>
<script>
    function myfun3(){
        var deptname = $("#deptname").val();
        if(deptname==""){
            alert("部门名称不能为空");
            return ;
        }
        $("#form4").submit();
    }
</script>
</body>
</html>